<h1><?=$h1?></h1>
<h2><?=$h2?></h2>
<?php if(empty($chamados)) {?>
    <p>Voc&ecirc; n&atilde;o possui nenhum chamado nesta lista.</p>
<?php } else { ?>
    <table>
        <thead>
            <tr>
                <td>Id</td>
                <td>Descri&ccedil;&atilde;o</td>
                <td>Status</td>
                <td>Data</td>
            </tr>
        </thead>
        <?php foreach($chamados as $chamado){ ?>
        <tr>
            <td>
                <a href="<?=$baseUrl?>chamado/ver/<?=$chamado->getId()?>">
                    <?=$chamado->getId()?>
                </a>
            </td>
            <td>
                <a href="<?=$baseUrl?>chamado/ver/<?=$chamado->getId()?>">
                    <?=$chamado->getDescricao()?>
                </a>
            </td>
            <td>
                <a href="<?=$baseUrl?>chamado/ver/<?=$chamado->getId()?>">
                    <?=$chamado->getStatus()->getDescricao()?>
                </a>
            </td>
            <td>
                <a href="<?=$baseUrl?>chamado/ver/<?=$chamado->getId()?>">
                    <?=date_format($chamado->getDataAbertura(), 'd/m/Y')?>
                </a>
            </td>
        </tr>
        <?php } ?>
    </table>
<?php } ?>